/**
 * Copyright &copy; 2016-2017 <a href="https://www.lczyfz.com">联创智云</a> All rights reserved.
 */
package com.lczyfz.campusinfo.modules.campusinfocompany.entity;

import com.lczyfz.campusinfo.modules.sys.entity.User;
import javax.validation.constraints.NotNull;
import org.hibernate.validator.constraints.Length;

import com.lczyfz.campusinfo.common.persistence.DataEntity;

/**
 * 公司权限Entity
 * @author zms
 * @version 2018-04-18
 */
public class LinkCompany extends DataEntity<LinkCompany> {
	
	private static final long serialVersionUID = 1L;
	private User user;		// 用户编号
	private String companyId;		// 公司编号
	private String companyName;
	public String getCompanyName() {
		return companyName;
	}

	public void setCompanyName(String companyName) {
		this.companyName = companyName;
	}

	public LinkCompany() {
		super();
	}

	public LinkCompany(String id){
		super(id);
	}

	@NotNull(message="用户编号不能为空")
	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}
	
	@Length(min=1, max=64, message="公司编号长度必须介于 1 和 64 之间")
	public String getCompanyId() {
		return companyId;
	}

	public void setCompanyId(String companyId) {
		this.companyId = companyId;
	}
	
}